// Domien Nowicki
#include "QtCheckpointActivateAnimation.h"

QtCheckpointActivateAnimation::QtCheckpointActivateAnimation(): checkpoint(0)
{
}

QtCheckpointActivateAnimation::QtCheckpointActivateAnimation(const QtCheckpointActivateAnimation& rhs): QtAnimationCommand(rhs), checkpoint(rhs.checkpoint)
{
}

QtCheckpointActivateAnimation::~QtCheckpointActivateAnimation()
{
}

void QtCheckpointActivateAnimation::SetCheckpoint(QtCheckpointSprite* receiver)
{
	checkpoint = receiver;
}

void QtCheckpointActivateAnimation::Execute()
{
	if (checkpoint)
	{
		checkpoint->Reached();
	}
}

QtAnimationCommand* QtCheckpointActivateAnimation::Clone() const
{
	return new QtCheckpointActivateAnimation(*this);
}
